package com.lejin.usercenter.service.impl;


import com.alibaba.druid.util.StringUtils;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lejin.order.entity.OrderPay;
import com.lejin.usercenter.mapper.OrderPayMapper;
import com.lejin.usercenter.service.IOrderPayService;
import com.lejin.vo.ResultVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 订单支付信息表 服务实现类
 * </p>
 *
 * @author luminghua
 * @since 2022-04-22
 */
@Service
public class OrderPayServiceImpl extends ServiceImpl<OrderPayMapper, OrderPay> implements IOrderPayService {


    @Autowired
    private OrderPayMapper orderPayMapper;


    @Override
    public ResultVO findOrderPayByUid(String userId) {
        if (StringUtils.isEmpty(userId)){

            return new ResultVO(false,"用户名不能为空");
        }


        List<OrderPay> byUserId = orderPayMapper.findByUserId(userId);
        return new ResultVO(true,"success",byUserId);

    }
}
